from goods_feedback.handle.search_usergoods import search_user_goods
from goods_feedback.handle.fileupload import upload

usergoods=search_user_goods()
img_data=upload()

parentorderno=usergoods['rows'][0]['parentorderno']
ctime=usergoods['rows'][0]['children'][0]['ctime']
buynum=usergoods['rows'][0]['children'][0]['buynum']
goodsid=usergoods['rows'][0]['children'][0]['goodsid']
goodstitle=usergoods['rows'][0]['children'][0]['goodstitle']
image=usergoods['rows'][0]['children'][0]['image']
orderid=usergoods['rows'][0]['children'][0]['orderid']
skuattr=usergoods['rows'][0]['children'][0]['skuattr']
userid=usergoods['rows'][0]['children'][0]['userid']

payloads={'buynum':buynum,
         'content':'该商品发货的时候包装袋破损了，请重新换一个好的包装的商品',
         'ctime':ctime,
         'goodsid':goodsid,
         'goodstitle':goodstitle,
         'image':image,
         'orderid':orderid,
         'parentorderno':parentorderno,
         'piciimg':img_data,
         'proimg':img_data,
         'skuattr':skuattr,
         'type':'优化意见',
         'userid':userid}


